< previous page page_747 next page >

Page 747
Answer: 10.
What will the following code produce?
9f31265bb40b592b1929e18a47ab28e5.gif
ReDim aintValues(2)
aintValues(1) = 20
Print aintValues(0)
Answer: 0.
What will the following code produce?
9f31265bb40b592b1929e18a47ab28e5.gif
Print aintValues(1)
Answer: 20.
Declare a constant named conValue that holds the value 1.
Answer:
9f31265bb40b592b1929e18a47ab28e5.gif
Const conValue As Integer = 1
Write a statement that adds 10 to the constant you created for the previous question and put the result in a variable called intValue.
Answer:
9f31265bb40b592b1929e18a47ab28e5.gif
intValue = conValue + 10
Chapter 8: Conditional Logic and Looping
Write an If statement that checks to see whether one number is greater than another and, if it is, displays a message box stating Number 1 is greater than Number 2.
Answer:
9f31265bb40b592b1929e18a47ab28e5.gif
If Number1 > Number2 Then
   MsgBox " Number 1 is greater than Number 2" 
End If
Write a Do...Loop that loops from 10 to 1. Print each value on the form.
Answer:
9f31265bb40b592b1929e18a47ab28e5.gif
intLoop 10
Do While intLoop > 0
   Print intLoop
   intLoop = intLoop - 1
Loop

 
< previous page page_747 next page >

If you like this book, buy it!